package com.cloud.tsp.mapper;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cloud.api.domain.stats.QueryRecord;
import com.cloud.api.domain.stats.RecordList;
import com.cloud.api.domain.tsp.*;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * OLAP Mapper 接口
 * </p>
 *
 * @author haohaibo
 * @since 2023-12-01
 */
@DS("doris")
public interface VehicleDataMapper extends BaseMapper<VehicleData> {

    List<VehicleLocation> selectTrackByVinTime(@Param("offset")long offset,@Param("limit")long limit,@Param("c") VinTimePeriod para);
    IPage<VehicleLocation> selectTrackByVinTimeNoCorrect(IPage<?> page,@Param("c") VinTimePeriod para);

    Long selectTrackByVinTimeCount(@Param("c") VinTimePeriod para);

    VehicleDataVo selectVehicleDataByVin(@Param("vin") String vin);

    IPage<RecordList> selectRealTimeRecord(IPage<?> page,@Param("c")QueryRecord para);

    VehicleDataVo selectRecordDetail(@Param("c")QueryRecord para);

    LockStatus selectVehicleData(@Param("vin") String vin);

    List<LocalDateTime> existVinDataTime(@Param("c") VinTimePeriod para);
}